{include file="public/head"}
<style>
	.yzl{
		float:right;height: 3rem;line-height:3rem;display: inline;padding-top:10%
	}
	.yzl li{
		float: left;color: #00cc7d;font-size: .5rem; width: .8rem;height: .8rem;text-align: center;line-height: .8rem;
	}
	.yzl li img{
		width: 100%;
	}
</style>
<!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
	<body>
		<!--header star-->
		<header class="mui-bar mui-bar-nav" id="header">
			<a class="btn" href="javascript:history.go(-1)">
	            <i class="iconfont icon-fanhui"></i>
	        </a>
	        <div class="top-sch-box top-sch-boxtwo flex-col">
	                    商品列表
	        </div>
	        <a class="btn" href="#">
	           
	        </a>
	    </header>
	    <!--header end-->
	
	    <div class="warp warptwo clearfloat" style="padding-bottom: 0.5rem;">
	    	<div class="shopcar clearfloat">
	    		{volist name="goodlist" id="vol"}
	    		<div class="list clearfloat fl" style="margin-bottom:0px;height:4.2rem">
	    			<div class="tu clearfloat fl">
	    				<span></span>
	    				<img src="/shop/upload/{$vol.picture}"/>
	    			</div>
	    			<div class="right clearfloat fl" style="width:42%">
	    				<p class="tit over">{$vol.goods_name}</p>
	    				{if $vol.promotion_type=="1"}
	    				<p class="jifen over"><span style="color:#000;font-size:0.4rem">原&nbsp;&nbsp;&nbsp;价：</span><s style="color:red">￥{$vol.price}</s></p>
	    				<p class="jifen over" style="color:red"><span style="color:#000;font-size:0.4rem">促销价：</span>￥{$vol.salesprice}</p>
	    				{/if}
	    				{if $vol.promotion_type=="0"}
	    				<p class="jifen over"><span style="color:#000;font-size:0.4rem">价格：</span>￥{$vol.salesprice}</p>
	    				{/if}
	    				<p class="jifen over"><span style="color:#000;font-size:0.4rem">状态：
	    					{if $vol.state=="0"}
	    					待审核
	    					{elseif $vol.state=="1"/}
	    					上架
	    					{elseif $vol.state=="2"/}
	    					审核失败
							{elseif $vol.state=="2"/}
	    					下架
							{/if}
	    				</span></p>
	    			</div>
	    		</div>
	    		<div style="height:1.5rem;margin-top:0px;clear:both;text-align:center;border-bottom:2px solid #ccc">
	    			{if $vol.state=="1"}
	    				<input type="button" value="下架" onclick="goodDown('{$vol.goods_id}')"/>&nbsp;&nbsp;
	    			{/if}
	    			{if $vol.state=="3"}
	    				<input type="button" value="上架"  onclick="goodUp('{$vol.goods_id}')"/>&nbsp;&nbsp;
	    			{/if}
	    			
	    			<input type="button" value="删除" style="background-color: red" onclick="goodDel('{$vol.goods_id}')"/>
	    		</div>
	    		<br/>
	    		{/volist}	
	    		
	    	</div>
	    </div>
	</body>
	
</html>
<script>
	function goodDown(goods_id){
		window.location.href="{:url('goodDown')}?goods_id="+goods_id;
	}
	function goodUp(goods_id){
		window.location.href="{:url('goodUp')}?goods_id="+goods_id;
	}
	function goodDel(goods_id){
		if(window.confirm('删除后无法恢复,是否删除？')){
			window.location.href="{:url('goodDel')}?goods_id="+goods_id;
		}else{
			return false;
		}
	}
</script>
